<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>MyBug系统--用户页面</title>
<link rel="stylesheet" type="text/css" href="css/result.css" />
<link rel="stylesheet" type="text/css" href="css/userindex.css" />

<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
	<jsp:include page="total.jsp"></jsp:include>
	<input type="hidden" id="phone_val" value="${userinfo.phone}"/>
	<input type="hidden" id="email_val" value="${userinfo.mailbox}"/>
	<div class="moduls">
		<div class="info">
			<ul class="head">
				<li class="head_photo"></li>
				<li class="nickname">昵称:<span style="color:red;">${userinfo.nikename
						}</span></li>
				<li class="approve"><div>认证：</div>
					<div class="phone c_phone">
						<a href=""><img src="images/icon/phone.png" width="13px"
							height="15px" /> </a>
					</div>
					<div class="phone c_email">
						<a href=""><img src="images/icon/email.png" width="15px"
							height="12px" /> </a>
					</div>
					<div class="clear"></div>
				</li>
				<div class="clear"></div>
				<li><a href="jsp/UserSetting.jsp" target="_black">账号设置</a></li>
			</ul>

		</div>
		<div class="clear"></div>

	</div>
	<div class="moduls">
		<div class="record">
			<ul class="seek">
				<li style="font-size: 17px; border-right: 1px dashed #DEDEDE;">搜索记录</li>
				<li><a href="userinfocontr/finduserinfo">我的搜索</a></li>
				<li><a href="">实时热点</a></li>
			</ul>
			<div class="clear"></div>
			<div class="showinfo">
				<div class="hint">最常检索的bug信息：</div>
				<c:forEach items="${searchInfo }" var="si">
					<div class="searhinfo">
						<a href="buginfocontr/findbyid/${si.bugId}" target="_black">${si.description}</a>
					</div>
				</c:forEach>

			</div>
			<ul class="showul">
			
				<li><a href="userinfocontr/finduserinfo?pageIndex=1">1</a>
				</li>
				<c:if test="${pagenumber > 1 }">
					<li><a href="userinfocontr/finduserinfo?pageIndex=2">2</a>
					</li>
				</c:if>

				<c:if test="${pagenumber > 2 }">
					<li><a href="userinfocontr/finduserinfo?pageIndex=3">3</a>
					</li>
				</c:if>

				<c:if test="${pagenumber > 3 }">
					<li><a href="userinfocontr/finduserinfo?pageIndex=4">4</a>
					</li>
				</c:if>

				<c:if test="${pagenumber > 4 }">
					<li><a href="userinfocontr/finduserinfo?pageIndex=5">5</a>
					</li>
				</c:if>

				<c:if test="${pageIndex < pagenumber }">
					<li style="width:100px;"><a
						href="userinfocontr/finduserinfo?pageIndex=${pageIndex + 1}">下一页&gt;</a>
					</li>
				</c:if>
				<c:if test="${pageIndex == pagenumber }">
					<li style="width:100px;"><a
						href="userinfocontr/finduserinfo?pageIndex=${pagenumber}">下一页&gt;</a>
					</li>
				</c:if>
				<div class="clear"></div>
			</ul>
		</div>

	</div>
	<div class="moduls">
		<div class="record">
			<ul class="seek">
				<li class="bug"><a href="userinfocontr/finduserinfo">BUG列表</a></li>
				<li class="bug"><a href="jsp/addbuginfo.jsp">添加BUG</a></li>
			</ul>
			<div class="clear"></div>
			<div class="showinfo">
				<div class="hint">添加的bug信息：</div>
				<c:forEach items="${addBugInfo }" var="adi">
					<div class="searhinfo">
						<div class="float_left bug_de"><a href="buginfocontr/findbyid/${adi.bugId}" target="_black">${adi.description}</a></div>
						<div class="float_right repair"><a href="jsp/changgebuginfo.jsp">修改</a><span style="margin-left:50px;"></span><a href="buginfocontr/deletebyid/${adi.bugId}">删除</a></div>
						<div class="clear"></div>
					</div>
				</c:forEach>

			</div>
			<ul class="showul">

				<li><a href="userinfocontr/finduserinfo?pageIndex2=1">1</a>
				</li>
				<c:if test="${pagenumber2 > 1 }">
					<li><a href="userinfocontr/finduserinfo?pageIndex2=2">2</a>
					</li>
				</c:if>

				<c:if test="${pagenumber2 > 2 }">
					<li><a href="userinfocontr/finduserinfo?pageIndex2=3">3</a>
					</li>
				</c:if>

				<c:if test="${pagenumber2 > 3 }">
					<li><a href="userinfocontr/finduserinfo?pageIndex2=4">4</a>
					</li>
				</c:if>

				<c:if test="${pagenumber2 > 4 }">
					<li><a href="userinfocontr/finduserinfo?pageIndex2=5">5</a>
					</li>
				</c:if>

				<c:if test="${pageIndex2 < pagenumber2 }">
					<li style="width:100px;"><a
						href="userinfocontr/finduserinfo?pageIndex2=${pageIndex2 + 1}">下一页&gt;</a>
					</li>
				</c:if>
				<c:if test="${pageIndex2 == pagenumber2 }">
					<li style="width:100px;"><a
						href="userinfocontr/finduserinfo?pageIndex2=${pagenumber2}">下一页&gt;</a>
					</li>
				</c:if>
				<div class="clear"></div>
			</ul>
		</div>
	</div>

	<script type="text/javascript">
		$(function() {
			var color = null;
			$(".seek li a").mouseover(function() {
				//鼠标移出
				color = $(this).css("background-color");
				$(this).css("background-color", "#e5e5e5");
			}).mouseout(function() {
				//移入
				$(this).css("background-color", color);
			});

		});

		$(function() {
			var color = null;
			$(".searhinfo").mouseover(function() {
				//鼠标移出
				color = $(this).css("background-color");
				$(this).css("background-color", "#e5e5e5");
			}).mouseout(function() {
				//移入
				$(this).css("background-color", color);
			});

		});
		$(function(){
		//alert("1");
			var phone=$("#phone_val").val().trim();
			var email=$("#email_val").val().trim();
			console.log(phone+"-------"+email);
			if(null!=phone&&""!=phone){
				$(".c_phone").css("background-color","#41acff");
			}else{
				$(".c_phone").css("background-color","#c0c0c0");
			}
			if(null!=email&&""!=email){
				$(".c_email").css("background-color","#41acff");
			}else{
				$(".c_email").css("background-color","#c0c0c0");
			}
		});
	</script>

</body>
</html>
